#include <stdio.h>


int main(void){
	int i, j;
	printf("Enter 2 digits:");
	scanf("%d%d", &i,&j);
	int res = getGCD(i, j);
	printf("GCD = %d\n", res);
}

int getGCD(int n, int m){
	int mod;
	while(n != 0){
		mod = m % n;
		m = n;
		n = mod;
	}
	return m;
}
